<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #box{
            width: 500px;
            height: 500px;
            background: skyblue;
            transition: all 3s ease ;
            position: relative;
            border-style: none;
        }
        #box2{
            width: 0%;
            height: 100%; 
            border-bottom-color: red;
            border-bottom-style: solid;
            position: absolute;
            transition: width .5s;
        }

        #box:hover #box2{
            /* border-bottom-color: red; */
            width: 100%;
        }

    </style>
</head>
<body>
    <!-- 
        方向: top  bottom  left  right    
        属性: color   width   style

        单边
            border-方向-属性
            border-方向:[color] | [width] | style

        四边
            border-属性:
            border: [color] | [width] | style
     -->
    <div id="box">
        <div id="box2"></div>
    </div>
</body>
</html>